package com.platform.enums;


import com.platform.comm.constants.EnumOption;
import com.platform.comm.enums.IDictEntry;
import com.platform.comm.enums.IEnumOption;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * 异议处理结果
 * @author zq
 */
@EnumOption(name = "objectionDealResult")
public enum ObjectionDealResult implements IDictEntry, IEnumOption<String> {

    /**
     * 核实无误
     */
    NO("核实无误"),

    /**
     * 取消公示
     */
    CA("取消公示"),

    /**
     * 删除信息
     */
    DE("删除信息"),

    /**
     * 更新信息
     */
    UP("更新信息");

    private final String description;

    ObjectionDealResult(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public String getKey() {
        return name();
    }

    @Override
    public String getValue() {
        return description;
    }

    @Override
    public Object getData() {
        return this;
    }

    @Override
    public String key() {
        return name();
    }

    @Override
    public String value() {
        return description;
    }

    @Override
    public Map<String, String> enums() {
        return Arrays.stream(values()).collect(Collectors.toMap(IEnumOption::key, IEnumOption::value));
    }
}
